package com.bigcms.service.impl;

import com.bigcms.domain.Art;
import com.bigcms.mapper.ArtMapper;
import com.bigcms.service.ArtService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ArtServiceImpl implements ArtService {

    @Autowired
    ArtMapper artMapper;

    @Override
    public int add(Art art) {
        return artMapper.add(art);
    }

    @Override
    public int edit(Art art) {
        return artMapper.edit(art);
    }

    @Override
    public Art get(int id) {
        return artMapper.find(id);
    }

    @Override
    public List<Art> getall() {
        return artMapper.findall();
    }

    @Override
    public int del(int id) {
        return artMapper.del(id);
    }
}
